﻿using Microsoft.SharePoint.Client;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Albatross.SharePoint.Explorer.ViewModels {
	public class NavigationNodeViewModel : ClientObjectViewModel {
		public NavigationNodeViewModel(ClientContext context, string name, NavigationNode node) : base(context, name, node) { }
		public NavigationNode Node { get { return (NavigationNode)ClientObject; } }
		public override string GetTreeItemTitle() {
			if (Name == string.Empty) {
				return Node.Title;
			} else {
				return Name;
			}
		}

		public override string GetContentTitle() {
			return string.Format("{0} - {1}", Name, Node.Title);
		}
	}
}
